#pragma once

#include <AVUITriggerBase.h>
#include <AVUISetterBaseCollection.h>

namespace AVUI {

class ConditionCollection;

/// <summary>Represents a trigger that applies property values or performs actions when the bound data meet a set of conditions. </summary>
class MultiDataTrigger : public TriggerBase
{
public:
    DECLARE_ELEMENT(MultiDataTrigger, TriggerBase);

#pragma region Public Methods

    /// <summary>Initializes a new instance of the <see cref="T:System.Windows.MultiDataTrigger" /> class.</summary>
    MultiDataTrigger();

#pragma endregion Public Methods

#pragma region Public Properties

    /// <summary>Gets a collection of <see cref="T:System.Windows.Condition" /> objects. Changes to property values are applied when all the conditions in the collection are met.</summary>
    /// <returns>A collection of <see cref="T:System.Windows.Condition" /> objects. The default is an empty collection.</returns>
    ConditionCollection* get_Conditions() { VerifyAccess(); return m_pConditions; }
    DECLARE_READONLY_PROPERTY(Conditions, ConditionCollection, false);

    /// <summary>Gets a collection of <see cref="T:System.Windows.Setter" /> objects that describe the property values to apply when all the conditions of the <see cref="T:System.Windows.MultiDataTrigger" /> are met.</summary>
    /// <returns>A collection of <see cref="T:System.Windows.Setter" /> objects. The default value is an empty collection.</returns>
    SetterBaseCollection* get_Setters();
    DECLARE_READONLY_PROPERTY(Setters, SetterBaseCollection, true);

#pragma endregion Public Properties

public:

#pragma region Internal Methods

    virtual bool GetCurrentState(DependencyObject* pContainer, UncommonField<HybridDictionaryArray>* pDataField) AVUI_OVERRIDE;
    virtual void Seal() AVUI_OVERRIDE;

#pragma endregion Internal Methods

private:

#pragma region Private Fields

    TRefCountedPtr<ConditionCollection> m_pConditions;
    TRefCountedPtr<SetterBaseCollection> m_pSetters;

#pragma endregion Private Fields

};

}; // namespace AVUI
